potentiometer as a variable resistor